import React, { useEffect } from 'react'
import { connect } from 'react-redux'
import {getSingersList} from '@/store/actionCreators'

 function Singers(props) {
const {singersList,getSingersListDispatch}=props
console.log(singersList,'+++++++')
useEffect(()=>{
  getSingersListDispatch()
},[])
  return (
    <div>
     
    </div>
  )
}
const mapStateToProps = (state) => {
  return {
      singersList: state.singer.singersLink
  }
}

const mapDispatchToProps=(dispatch)=>{
  return{
    getSingersListDispatch(){
      // 派action
      dispatch(getSingersList())
    }
  }
}

export default connect(mapStateToProps,mapDispatchToProps)(Singers)